package com.easy.easy.Controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("shopping")
public class ShoppingPageController {
    @RequestMapping("index")
    public String index() {
        return "shopping/index.html";
    }

    @RequestMapping("signin")
    public String login() {
        return "shopping/signin.html";
    }


    @RequestMapping("cart")
    public String cart() {
        return "shopping/cart.html";
    }

    @RequestMapping("product")
    public String product(Integer id, Model model) {
        model.addAttribute("id", id);
        return "shopping/product-details.html";
    }

    @RequestMapping("shop")
    public String shop(Integer id, Model model) {
        model.addAttribute("id", id);
        return "shopping/shop.html";
    }

    @RequestMapping("my")
    public String center(Integer id, Model model) {
        model.addAttribute("id", id);
        return "shopping/my.html";
    }

    @RequestMapping("msg")
    public String msg(Integer id, Model model) {
        model.addAttribute("id", id);
        return "shopping/msg.html";
    }

    @RequestMapping("address")
    public String address() {
        return "shopping/address.html";
    }

    @RequestMapping("order")
    public String order(Integer id, Model model) {
        model.addAttribute("id", id);
        return "shopping/order.html";
    }

    @RequestMapping("signup")
    public String signup() {
        return "shopping/signup.html";
    }

    @RequestMapping("totalorder")
    public String totalorder(Integer id, Model model) {
        model.addAttribute("id", id);
        return "shopping/totalorder.html";
    }

    @RequestMapping("orderaddress")
    public String orderaddress(Integer id, Model model) {
        model.addAttribute("id", id);
        return "shopping/orderaddress.html";
    }

    @RequestMapping("payment")
    public String payment(Integer id, Model model) {
        model.addAttribute("id", id);
        return "shopping/payment.html";
    }



}
